<?php global $servicesPath, $voPath; // init the global vars from "www/amfphp/globals.php" ?>

<h1>Bienvenue dans la demos</h1>
<?php
    // some tests
    echo '<p>Camelize "toto_titi": ' . StringsHelper::camelize('toto_titi'). '</p>';
    echo '<p>Tableize "TotoTiti": ' . StringsHelper::tableize('TotoTiti'). '</p>';
    echo '<p>' . $servicesPath . "<br />" . $voPath . '</p>';
    echo '<p>' . UriHelper::get( 'demos', 'index', array( 'id' => 1 ) ) . '</p>';
    echo '<p>' . UriHelper::get( 'menus', 'edit', array( 'id' => 1, 'label' => 'Tééto' ), true ) . '</p>';
    echo '<p>' . $_SERVER['HTTP_HOST'] . '</p>';
    echo '<pre>' ;
        var_dump( strtotime( '1901-12-13 21:59:59' ) );
    echo '</pre>';
    echo '<p>' . HtmlHelper::dateTime( 'menu', array(), array(), false, '1990-12-13 21:34:59', true ) . '</p>';

    $manager   = new ErrorsModelManager( new ErrorsModelVO( array( 'globalErrors' => array( new ErrorVO( array( 'message' => 'the fields doesn\'t match' ) ) ) ) ) );
    $errorList = HtmlHelper::renderGlobalErrors( $manager );

?>
<div class="ui-widget">
    <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
        <p>
            <span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;">&nbsp;</span>
            <strong>Alert:</strong> <?php echo $errorList ?>
        </p>
    </div>
</div>